Goth and Gore Gifts
Shop right now or else!
Till death do us part
Axels New Music releases
Evil gear
Christmas is almost here
Viking gear
Gear Gifts and Apparel

here are some of the best and useful php scripts and snippets to help in your projects. Php displayed below. Use the search for specific script lookups. Click the category links to view scripts in Javascript and cgi. To add your own script click the link and add your useful script example.

edit your html files online using this cgi html editor

cgi html editor
html-editor date added Jan 2013

#!/usr/bin/perl
#
# Matt Kruse
# http://mkruse.netexpress.net/
#


use CGI qw(:standard);

$cgi = $ENV{'SCRIPT_NAME'};
print "Conten
t-type: text/html\n\n";

# Template file uploaded - generate form
#
 --------------------------------------
if ($file = param('filename')
) {
    $tmpfile=tmpFileName($file);
    while (<$file>) {
        $templ
ate .= $_;
    }
    close $file;

    print <<"END";
<HTML>
<HEAD>
<TITLE>Data Entry Form</TITLE></HEAD>
<BODY BGCOLOR=white>
<BR>
<CE
NTER>
<TABLE BORDER=1 BORDERCOLOR="#333333" CELLSPACING=0 CELLPADDING
=3>
<TR>
    <TD ALIGN=CENTER BGCOLOR="#000080"><FONT COLOR="white" SIZ
E="+1"><B>Data Entry Form</B></FONT></TD>
</TR>
<TR>
    <TD BGCOLOR="
#CCCCCC">
        <FORM ACTION="$cgi" METHOD=POST>
        <TABLE BORDER=1>
        <
TR><TH>Field Name</TH><TH>Value</TH></TR>
END
        foreach ($template =
~ /<%([^\%]+)%>/gs) {
            $keys{$_}++;
            }
        foreach (sort keys %ke
ys) {
            print "<TR><TD ALIGN=RIGHT><B>$_</B></TD><TD ALIGN=LEFT><TEX
TAREA NAME=\"$_\" COLS=50 ROWS=3 WRAP=VIRTUAL></TEXTAREA></TD></TR>\n"
;
            }
        print <<"END";
        <TR><TD COLSPAN=2 ALIGN=CENTER><BR><INPUT
 TYPE="submit" VALUE="Submit"><BR><BR></TD></TR>
        <TR><TD COLSPAN=2 
ALIGN=CENTER><TEXTAREA NAME="template" ROWS=10 COLS=80>$template</TEXT
AREA></TD></TR>
        </TABLE>
        </FORM>
        <HR>
    </TD>
</TR>
</TABLE
>
</BODY>
</HTML>
END
    
}

# Form submitted - generate output

# --------------------------------
elsif (param('template')) {
    $tem
plate = param('template') || "No template";
    foreach $key ( param() )
 {
        next if ($key eq "template");
        $template =~ s|<%$key%>|param($
key)|egs;
        }
    print "$template";
    }

# First load - prompt for t
emplate
# --------------------------------
else {
    print <<"END";

<HTML>
<HEAD><TITLE>HTML Replace Utility</TITLE></HEAD>
<BODY BGCOLO
R=white>
<BR>
<CENTER>
<TABLE BORDER=1 BORDERCOLOR="#333333" CELLSP
ACING=0 WIDTH=400 CELLPADDING=3>
<TR>
    <TD ALIGN=CENTER BGCOLOR="#00
0080"><FONT COLOR="white" SIZE="+1"><B>HTML Replace Utility</B></FONT>
</TD>
</TR>
<TR>
    <TD BGCOLOR="#CCCCCC">
<br>
Use this script to 
easily replace an HTML template file with values you specify in a form
.<P>
Specify your HTML template file here, click submit, and a form w
ill be generated for you.<p>

<FORM ACTION="$cgi" METHOD="POST" ENCT
YPE="multipart/form-data">
<B> Template Filename: </B> <INPUT TYPE="F
ILE" NAME="filename" SIZE=30>  
<INPUT TYPE="SUBMIT" VALUE="submit">

</FORM>

    <HR>
    <table border=0 align=center>
    <tr>
        <td align=
center>
        <FORM ACTION="http://mkruse.netexpress.net/scripts/replace/
feedback/" method="get">
        <input type="submit" value="Give Feedback"
>
        </FORM>
        </td>

        <td align=center>
        <FORM ACTION="http://m
kruse.netexpress.net/scripts/support/" method="get">
        <input type="s
ubmit" value="Script Support">
        </FORM>
        </td>
    </tr>
    </table>


    </TD>
</TR>
</TABLE>
</CENTER>

</BODY>
</HTML>
END
    }
    






Add your comment.













No comments yet

Search ScriptsnTips


Php JavaScripts CGI/Perl